package main

import "fmt"

type rect struct {
	width, height int
}

func (r *rect) area() int {
	return r.width * r.height
}
func (r rect) perm() int {
	return 2*r.height + 2*r.width
}
func main() {
	r := rect{
		width:  4,
		height: 5,
	}
	fmt.Println(r.area())
	fmt.Println(r.perm())

	rp := &r
	fmt.Println(rp.area())
	fmt.Println(rp.perm())
}
